package rpc.frame.core.request;

import io.netty.channel.Channel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

@Data
@Slf4j
public class ChannelMapping {

    /**
     * 服务提供者节点
     */
    private String ipWithPort;

    /**
     * Ip
     */
    private String ip="127.0.0.1";

    /**
     * 端口
     */
    private int port;

    /**
     * Channel
     */
    private Channel channel;


    public String getIpWithPort(){
        return ip+":"+port;
    }

    public ChannelMapping(String ip, int port, Channel channel) {
        this.ip = ip;
        this.port = port;
        this.channel = channel;}

}
